-
-
Notifications
You must be signed in to change notification settings - Fork 15k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
megacmd: add ffmpeg and freeimage support; add darwin support #362308
Conversation
Do we know exactly what features including ffmpeg and freeimage enables? |
FFmpeg is for video preview/thumbnail generation, and FreeImage is for image preview/thumbnail generation. Don't know how these features are relevant to a CLI app but there they are. |
This is truly curious. Help needed. |
Is forcing GCC instead of Clang necessary to fix something or demanded by upstream, or would using the default be fine? The following builds just fine with the regular diff --git a/pkgs/by-name/me/megacmd/fix-darwin.patch b/pkgs/by-name/me/megacmd/fix-darwin.patch
index 12f0733f91a1..e46d8d99b9b4 100644
--- a/pkgs/by-name/me/megacmd/fix-darwin.patch
+++ b/pkgs/by-name/me/megacmd/fix-darwin.patch
@@ -6,7 +6,7 @@
+if DARWIN
+AM_LIBTOOLFLAGS="--tag=CXX"
-+AM_CPPFLAGS+=-I$(top_srcdir)/include/mega/osx
++AM_CPPFLAGS+=-I$(top_srcdir)/sdk/include/mega/osx -I$(top_srcdir)/include/mega/osx
+endif
+
if WIN32
@@ -25,7 +25,7 @@
+if DARWIN
+AM_LIBTOOLFLAGS="--tag=CXX"
-+AM_CPPFLAGS+=-I$(top_srcdir)/include/mega/osx
++AM_CPPFLAGS+=-I$(top_srcdir)/sdk/include/mega/osx -I$(top_srcdir)/include/mega/osx
+endif
+
if WIN32
diff --git a/pkgs/by-name/me/megacmd/package.nix b/pkgs/by-name/me/megacmd/package.nix
index 53a5159e7cc8..59acd25766d1 100644
--- a/pkgs/by-name/me/megacmd/package.nix
+++ b/pkgs/by-name/me/megacmd/package.nix
@@ -8,7 +8,6 @@
fetchFromGitHub,
ffmpeg,
freeimage,
- gcc-unwrapped,
icu,
libmediainfo,
libraw,
@@ -19,7 +18,6 @@
pkg-config,
readline,
sqlite,
- darwin,
withFreeImage ? false, # default to false because freeimage is insecure
}:
@@ -58,10 +56,9 @@ stdenv.mkDerivation {
[
c-ares
cryptopp
- curl.dev
+ curl
ffmpeg
icu
- gcc-unwrapped
libmediainfo
libraw
libsodium
@@ -72,16 +69,7 @@ stdenv.mkDerivation {
sqlite
]
++ lib.optionals withFreeImage [ freeimage ]
- ++ lib.optionals stdenv.isDarwin (
- with darwin.apple_sdk.frameworks;
- [
- CoreFoundation
- CoreServices
- SystemConfiguration
- Cocoa
- DiskArbitration
- ]
- );
+ ;
configureFlags = [
"--disable-curl-checks"
|
6f8edf7
to
4de846c
Compare
4de846c
to
7c87ea1
Compare
Thank you @OPNA2608. I got it working. It seems that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Add FFmpeg support via a patch. Add FreeImage support optionally (user can risk the insecurity by overriding an argument). Add Darwin support.
Closes #297586.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.